home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / PlayerPRO 4.4.1 / MADF Library 3.0 / MAD.h < prev    next >
Text File  |  1995-04-10  |  2KB  |  71 lines

  1. /********************                        ***********************/
  2. //
  3. //    Player PRO 4.4x -- MAD Music Driver Definition
  4. //
  5. //    Library Version 3.0
  6. //
  7. //    To use with MusicLibrary for Think C & CodeWarrior
  8. //
  9. //    Antoine ROSSET
  10. //    16 Tranchees
  11. //    1206 GENEVA
  12. //    SWITZERLAND
  13. //    
  14. //    FAX:            (+41 22) 346 11 97
  15. //    Compuserve:    100277,164
  16. //    Internet:         rosset@dial.eunet.ch
  17. //
  18. /********************                        ***********************/
  19.  
  20. #if defined(powerc) || defined(__powerc)
  21. #pragma options align=mac68k
  22. #endif
  23.  
  24. struct PatHeader {
  25.     long    PatternSize;            // Length of pattern: standard = 64
  26.     long    CompressionMode;        // Compression mode, none = 'NONE'
  27.     char    PatternName[ 20];
  28.     long    PatBytes;                // Pattern Size in Bytes
  29.     long    unused2;
  30. };
  31.  
  32. struct Command {
  33.     Byte    InstrumentNo;        // Instrument no
  34.     Byte     AmigaPeriod;        // Note, see table
  35.     Byte     EffectCmd;            // Effect cmd
  36.     Byte     EffectArg;            // Effect arg
  37. };
  38.  
  39. struct MusicPattern
  40. {                                // Pattern = 64 notes to play
  41.     struct PatHeader    header;
  42.     struct Command    Commands[];
  43. };
  44.  
  45. struct FileInstrData {
  46.     char     Filename[ 32];        // Instrument's filename
  47.     long     insSize;            // Sample length
  48.     Byte     fineTune;
  49.     Byte     volume;            // Base volume
  50.     short    CompCode;            // Compression Code, 0 = nothing, M3 = MAC3, M6 = MAC6
  51.     short    freq;                // Base frequence, simple, double, quadruple
  52.     Byte    amplitude;            // 8 or 16 bits
  53.     long    loopStart;            // LoopStart
  54.     long    loopLenght;            // LoopLength
  55. };
  56.  
  57. struct MADSpec
  58. {
  59.     long    MADIdentification;        // Mad Identification: MADG in version 2.0
  60.     char     NameSignature[ 32];    // Music's name
  61.     struct     FileInstrData fid[ 64];    // 64 instruments descriptor
  62.     Byte    PatMax;
  63.     Byte     numPointers;            // Patterns number
  64.     Byte    oPointers[ 128];        // Patterns list
  65.     Byte    Tracks;                    // Tracks number
  66. };
  67. typedef struct MADSpec MADSpec;
  68.  
  69. #if defined(powerc) || defined(__powerc)
  70. #pragma options align=reset
  71. #endif